package com.matt.repository;

import com.matt.domain.ContractProduct;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * *******************
 * description :合同-产品
 * Created by Ron
 * from com.matt
 * on 2018/6/14 0014.
 * *******************
 */
public interface ContractProductRepository extends JpaRepository<ContractProduct,String> {

    List<ContractProduct> findByContractId(String contractId);

    List<ContractProduct> findAllByClienteleIdOrderByCreatedDesc(String clienteleId);

    ContractProduct findFirstByClienteleIdAndId(String clienteleId, String id);

    List<ContractProduct> findByProductId(String productId);
}
